package com.caijg.controller.user;


import com.caijg.domain.po.Feedback;
import com.caijg.domain.vo.Result;
import com.caijg.service.IFeedbackService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户反馈表 前端控制器
 * </p>
 *
 * @author caijg
 * @since 2025-01-02
 */
@RestController
@RequestMapping("/user/feedback")
@Slf4j
@Tag(name = "用户反馈")
public class UserFeedbackController {

    @Autowired
    private IFeedbackService feedbackService;

    @PostMapping("/submit")
    public Result submitFeedback(@RequestBody Feedback feedback){
        log.info("用户提交反馈：{}", feedback);
        feedbackService.save(feedback);
        return Result.success();
    }
}
